<template>
	<view class="app-leaks">
		<scroll-view scroll-y="true" class="scroll-view-box" @scrolltolower="getData" lower-threshold="60">
			<view class="e-p-20">
				<view class="app-leaks__item bg-white border-radius-20 e-m-b-20 e-p-20" v-for="(item,index) in list" :key="item.id">
					<view class="e-flex e-font-28 c-333 e-m-b-14">
						<view class="e-flex-1">
							{{item.userNickname}}
						</view>
						<view class="">
							{{item.realReleaseMoney}}
						</view>
					</view>
					<view class="e-font-24 e-flex" style="color: #B3B3B3;" v-if="item.createTime">
						<view class="e-flex-1">
							{{item.createTime}}
						</view>
						<view class="">
							{{item.releaseTime}}
						</view>
					</view>
<!-- 					<view class="e-flex">
						<view class="e-flex-1 c-red">
							<text v-if="item.status === 1">已领取</text>
							<text v-else-if="item.status === 2">异常</text>
							<text v-else-if="item.status === 3">待领取</text>
						</view>
					</view> -->
				</view>
				<empty :text="$t('user.暂无记录')"  :icon="$staticPath('default_img.png')" show  v-if="list.length === 0"></empty>
				<load-more v-else :showLoad="showLoad"></load-more>
			</view>
		</scroll-view>

	</view>
</template>

<script>
	import {getReleaseApplyList} from '@/common/request/api'
	export default {
		data() {
			return {
				showLoad: false,
				pageNum: 1,
				isGet: true,
				list: [],
			}
		},
		onShow() {
			this.getData()
		},
		methods:{
			getData() {
				if (this.isGet && !this.showLoad) {
					let { pageNum } = this
					let data = {
						pageNum,
						pagesSize:10,
						releaseType:4
					}
					this.showLoad = true
					getReleaseApplyList(data).then(res => {
						this.showLoad = false
						if (res.code == 200) {
							let loadRes = this.$pageLoad(this.list, res.rows, pageNum, 10)
							
							this.pageNum = loadRes.pageNo
							if (this.list.length == res.total) {
								this.isGet = false
							}
						}
					})
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	.scroll-view-box {
		height: 100vh;
	}
	@include appBem_b(leaks) {
		@include appBem_e(item) {
			
		}
	}
	.collect-box {
		width: 80vw;
	}
	.cancle-btn {
		padding:10rpx 30rpx;
		border:1rpx solid #ccc;
		border-radius: 90rpx;
		width:200rpx;
		height:90rpx;
	}
	.submit-btn {
		width:200rpx;
		height:90rpx;
		border-radius: 90rpx;
	}
</style>